package com.yunxin.core.infra.persistence.mapper.product;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.yunxin.core.infra.persistence.entity.product.ProductUnitPriceConfigDO;
import com.yunxin.core.infra.persistence.entity.product.query.result.ProductChargedInfoResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author zero°
 * @since 2023-05-25
 */
@DS("core")
@Mapper
public interface ProductUnitPriceConfigExtendMapper extends ProductUnitPriceConfigMapper {

    /**
     * 根据产品id查询产品单价配置
     * @param productId productId
     * @return ProductUnitPriceConfigDO
     */
    ProductUnitPriceConfigDO selectByProductId(@Param("productId") Long productId);

    /**
     * 根据产品id集合查询产品单价配置
     * @param productIds productIds
     * @return List<ProductChargedInfoResult>
     */
    List<ProductChargedInfoResult> listByProductIds(@Param("productIds") Set<Long> productIds);
}
